package day4.作业1026.作业07;

public class Changfx extends Image{
    private double chang;
    private double kuan;

    public Changfx(double chang, double kuan) {
        this.chang = chang;
        this.kuan = kuan;
    }
    @Override
    public void mianji() {
        double mj=chang*kuan;
        System.out.println("长为"+chang+"宽为"+kuan+"的长方形面积为"+mj);
    }

    @Override
    public void zhouchang() {
        double zc = 2*(chang+kuan);
        System.out.println("长为"+chang+"宽为"+kuan+"的长方形周长为"+zc);

    }
}
